package model;
import java.util.HashMap;


public class Word {

	/**
	 * @uml.property  name="word"
	 */
	private String word;
	/**
	 * @uml.property  name="occInText"
	 */
	private int occInText;
	/**
	 * @uml.property  name="wordOccInSentence"
	 * @uml.associationEnd  qualifier="valueOf:java.lang.Integer java.lang.Integer"
	 */
	HashMap<Integer,Integer> wordOccInSentence;//k =sentenceNo, v=occ


	public Word(String word) {
		super();
		this.word = word;
		this.wordOccInSentence= new HashMap<Integer, Integer>();
		this.occInText=1;
	}

	public HashMap<Integer, Integer> getWordOccInSentence() {
		return wordOccInSentence;
	}

	public void setWordOccInSentence(HashMap<Integer, Integer> wordOccInSentence) {
		this.wordOccInSentence = wordOccInSentence;
	}

	/**
	 * Getter of the property <tt>word</tt>
	 * @return  Returns the word.
	 * @uml.property  name="word"
	 */
	public String getWord() {
		return word;
	}

	/**
	 * Setter of the property <tt>word</tt>
	 * @param word  The word to set.
	 * @uml.property  name="word"
	 */
	public void setWord(String word) {
		this.word = word;
	}

	/**
	 * @uml.property  name="occurence"
	 */
	private int occurence;

	/**
	 * Getter of the property <tt>occurence</tt>
	 * @return  Returns the occurence.
	 * @uml.property  name="occurence"
	 */
	public int getOccurence() {
		return occurence;
	}

	/**
	 * Setter of the property <tt>occurence</tt>
	 * @param occurence  The occurence to set.
	 * @uml.property  name="occurence"
	 */
	public void setOccurence(int occurence) {
		this.occurence = occurence;
	}
	/**
	 * @return
	 * @uml.property  name="occInText"
	 */
	public int getOccInText() {
		return occInText;
	}

	/**
	 * @param occInText
	 * @uml.property  name="occInText"
	 */
	public void setOccInText(int occInText) {
		this.occInText = occInText;
	}
	
	public String toString(){
		return word+" "+getOccInText();
		
	}
}
